/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates.assets;

import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;

/**
 *
 * @author Jarrod Risley
 */
public class KittyDrivetrain {
    
    /*
     * Global Variables
     */
    private Jaguar leftDrivetrain[];
    private Jaguar rightDrivetrain[];
    
    
    // CONSTRUCTOR //
    
    
    /**
     * Constructs the six-CIM drivetrain.
     */
    
    public KittyDrivetrain() {
        
        for (int z = 0; z < leftDrivetrain.length; z++) {
            leftDrivetrain[z] = new Jaguar(z + 1);
        } // end LeftMotor for enumeration
        
        int s = 4;
        for (int z = 0; z < rightDrivetrain.length; z++) {
            rightDrivetrain[z] = new Jaguar(s);
            s++;
        } // end rightMotors for enumeration
        
    } // end KittyDrivetrain Constructor
    
    
    // METHODS //
    
    
    /**
     * Takes a <b>double</b> from a <b>joystick</b> and sets the Jaguars to that
     * value. This method moves the <b>left</b> side of Kitty.
     * 
     * @param amount Joystick input.
     */
    
    public void moveLeft(double amount) {
        
        for (int z = 0; z < leftDrivetrain.length; z++) {
            leftDrivetrain[z].set(amount);
        } // end for
        
    } // end moveLeft
    
    /**
     * Takes a <b>double</b> from a <b>joystick</b> and sets the Jaguars to that
     * value. This method moves the <b>right</b> side of Kitty.
     * 
     * @param amount Joystick input.
     */
    
    public void moveRight(double amount) {
        
        for (int z = 0; z < rightDrivetrain.length; z++) {
            rightDrivetrain[z].set(amount);
        } // end for
        
    } // end moveRight
    
} // end KittyDrivetrain
